package com.neuedu.thread;
//  继承   Thread
public class ThreadDemo01 extends Thread {
    public static void main(String[] args) {
        ThreadDemo01  t1 = new ThreadDemo01();
        t1.start();// - > run
        for(int i = 0; i<10000;i+=2){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(i);
        }

    }

    @Override
    public void run() {
        for(int j = 1;j < 10000;j+=2){
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.err.println(j);
        }
    }
}
